<ion-view title="运单列表">
    <ion-nav-buttons side="left">
        <button class="button back-button buttons icon ion-ios-arrow-left button-clear header-item" nav-direction="back" ng-click="myGoBack()">返回</button>
    </ion-nav-buttons>

    <ion-content on-drag-right="dragRight()">

        <div class="bar bar-header item-input-inset">
            <label class="item-input-wrapper">
                <i class="icon ion-ios-search placeholder-icon"></i>
                <input type="search" placeholder="运单号/发货人/物品名称" id="menusearch" ng-model="search.content" >
            </label>
        </div>
        <ion-refresher
                pulling-text="下拉刷新..."
                on-refresh="doRefresh1()">
        </ion-refresher>

        <div ng-if="showloading1" style="margin-top:60px; text-align: center">
            <ion-spinner icon="ios" style="height: 60px; width: 60px;"></ion-spinner>
        </div>
        <ion-list ng-if="showloading1 == false">
            <h5 ng-if="cydData1==''" style="color: #69717d;text-align: center;margin-top: 50px;">未找到数据</h5>
            <ion-item collection-repeat="cyd in cydData1" class="cydListItem" style="padding-top: 5px; padding-bottom: 5px;border-top-style: none;border-bottom-style: none;">
                <div class="ydList card list-inset" style="margin-bottom: 5px;">
                    <div class="xuhao">
                        <div class="light list-operation button-border" ng-if="cyd.cyzt==10&&bmmc==cyd.lrbmmc" ui-sref="cydChange({ cyd_id : cyd.cyd_id })">
                            <i class="light list-operation">修改</i>
                        </div>
                        <i class="light" style="float: right;" ng-if="cyd.cyzt==10&&bmmc==cyd.lrbmmc">丨</i>
                        <div class="light list-operation button-border" ng-if="cyd.cyzt==10&&bmmc==cyd.lrbmmc"  ng-click="yundandy(cyd.cyd_id)">
                            <i class="light list-operation">打印</i>
                        </div>
                    </div>
                    <div ui-sref="cydtab({ cyd_id : cyd.cyd_id })">
                        <label class="item item-input">
                            <i class="list-input">承运单号：</i>
                            <p>{{cyd.cydh}}</p>
                            <img src="img/cyzt{{cyd.qsfs==2?'160':cyd.cyzt}}.png"class="zt">
                        </label>
                        <label class="item item-input">
                            <p ng-if="cyd.shbmmc!=''&&cyd.mdd==''">{{cyd.lrbmmc}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> {{cyd.shbmmc}}</p>
                            <p ng-if="cyd.shbmmc==''&&cyd.mdd!=''">{{cyd.lrbmmc}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> <span style="color: #62C847;">{{cyd.mdd}}</span></p>
                            <p ng-if="cyd.shbmmc!=''&&cyd.mdd!=''">{{cyd.lrbmmc}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i> {{cyd.shbmmc}}<i class="ion-minus" style="font-size: 16px"></i><i class="ion-arrow-right-c" style="font-size: 16px"></i><span style="color: #62C847;">{{cyd.mdd}}</span></p>
                        </label>
                        <label class="item item-input">
                            <i class="list-input">货名：</i>
                            <p>{{cyd.hwmc}}</p>
                        </label>
                        <label class="item item-input">
                            <i class="list-input">件数：</i>
                            <p ng-if="cyd.hwsl!=''">{{cyd.hwsl}}件</p>
                        </label>
                        <label class="item item-input">
                            <i class="list-input">运费：</i>
                            <p ng-if="cyd.yf!=''">{{cyd.yf | number:2}}</p>
                            <p ng-if="cyd.yf==''">0</p>
                        </label>
                        <label class="item item-input">
                            <i class="list-input">货款：</i>
                            <p>{{cyd.hdfk}}</p>
                        </label>
                    </div>
                </div>
            </ion-item>
        </ion-list>

        <ion-infinite-scroll   on-infinite="loadMore1()"  distance="1%" ng-if="hasNextPage1()"></ion-infinite-scroll>

    </ion-content>
    <ion-footer-bar style="height: 44px;padding: 10px;">
        <i style="font-size: 12px;">总单数：</i>
        <p style="font-size: 10px;">{{cydhj1.ydhj!=undefined?cydhj1.ydhj:0}}</p>
        <i style="margin-left: 2px;font-size: 12px;">运费合计：</i>
        <p style="font-size: 10px;">{{cydhj1.yfhj!=undefined?(cydhj1.yfhj | number:2):0}}</p>
        <i style="margin-left: 2px;font-size: 12px;">货款合计：</i>
        <p style="font-size: 10px;">{{cydhj1.hkhj!=undefined?(cydhj1.hkhj | number:2):0}}</p>
    </ion-footer-bar>
</ion-view>
